﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="VideoUpload.aspx.cs" Inherits="Pages_Social_VideoUpload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script type="text/javascript">
        function checkForFile() {
            if (document.getElementById('file').value) {
                document.getElementById('imgLoading').style.display = '';
                document.getElementById('errMsg').style.display = 'none';
                return true;
            }
            document.getElementById('errMsg').style.display = '';
            return false;
           }
           function submitForm(url, token) {           	
           		var uploader = document.forms[0];
           		uploader.setAttribute('action', url);
           		var hf = document.getElementsByName('token');
           		hf[0].value = token;
           		if(checkForFile())
					uploader.submit();
		   }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="file" id="file" name="file" />
        <input type="hidden" name="token" value="<%=Token %>" />
        <div id="errMsg" style="display: none; color: red">
            You need to specify a file.
        </div>
        <div>
            <img src="/Images/ajax-loader.gif" id="imgLoading" alt="Uploading" style="display: none" />
        </div>
        <div class="clear">
        </div>
    </div>
    </form>
</body>
</html>